﻿@model IEnumerable<Capstone_20130302.Models.SearchItem>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div><b>Product</b></div>
<table id="productresult">
@foreach (var item in Model.Where(i => i.Text == "Product"))
{    
    <tr>
        <td>
            <img src="@Html.DisplayFor(modelItem => item.ImageUrl)"/>
        </td> 
        <td>            
            @Html.ActionLink(""+@Html.DisplayFor(modelItem => item.Value), "Product/"+@Html.DisplayFor(modelItem => item.ID))
        </td>
    </tr>
}
</table>

<div><b>Store</b></div>
<table id="storeresult">
@foreach (var item in Model.Where(i => i.Text == "Store"))
{
    <tr>
        <td>
            <img src="@Html.DisplayFor(modelItem => item.ImageUrl)"/>
        </td> 
        <td>            
            @Html.ActionLink(""+@Html.DisplayFor(modelItem => item.Value), "Store/"+@Html.DisplayFor(modelItem => item.ID))
        </td>
    </tr>
}
</table>

<div><b>User</b></div>
<table id="userresult">
@foreach (var item in Model.Where(i => i.Text == "User"))
{
    <tr>
        <td>
            <img src="@Html.DisplayFor(modelItem => item.ImageUrl)"/>
        </td> 
        <td>            
            @Html.ActionLink(""+@Html.DisplayFor(modelItem => item.Value), "User/"+@Html.DisplayFor(modelItem => item.ID))
        </td>
    </tr>
}
</table>



